home *** CD-ROM | disk | FTP | other *** search
/ The Arsenal Files 1 / The Arsenal Files (Arsenal Computer).ISO / bbs / tm0207.txt < prev    next >
Text File  |  1994-01-23  |  4KB  |  87 lines

  1. SEA Technical Memorandum #0207, SEAdog 4.50; Chat Session Protocol
  2. Last updated: December 8, 1988
  3. Copyright 1988 by System Enhancement Associates, Inc.
  4.  
  5.  
  6.  
  7.                                 SEAdog 4.50
  8.  
  9.                            Chat Session Protocol
  10.  
  11.  
  12. This document describes the protocol used in a "chat session" as 
  13. implemented in version 4.50 of the SEAdog mail system.  
  14.  
  15. The chat session protocol makes extensive use of a "string transmit" 
  16. function, which is identical to that used by the file request mechanism.  
  17. The transmitter first sends a "signal byte" indicating what sort of string 
  18. is being sent.  This is then followed by the actual string, which is 
  19. terminated with an ETX (hex value 03h), followed by a two-byte CRC of the 
  20. string characters (everything after the initial signal character and before 
  21. the ETX).  The CRC is sent high byte first, then low byte.  The string 
  22. receiver responds with an ACK (hex value 06h) if the string was received 
  23. correctly, or a NAK (hex value 15h) if it was not.
  24.  
  25.  
  26. A chat session begins with a chat initiation request.  During this phase 
  27. the two systems involved have different roles, and it is important to keep 
  28. in mind who is doing what.  We will distinguish the two systems by 
  29. referring to the system that placed the call as the "swooner", and the 
  30. system that answered as the "swain".  With that in mind, a chat session is 
  31. initiated as follows: 
  32.  
  33.  1) The swooner places a call to the swain.  On getting carrier he whacks 
  34.     return and they match baud rates.  
  35.  
  36.  2) Instead of sending a TSYNC for a mail session, he sends an AHOY (hex 
  37.     value 0EAh) to request a chat session.  
  38.  
  39.  3) If the swain is unwilling to engage in a chat session, she responds 
  40.     with a CAN (hex value 18h).  Otherwise she responds with another AHOY, 
  41.     followed by an ENQ (hex value 05h) to request the swooner's name.  
  42.  
  43.  4) The swooner responds to the ENQ by transmitting an identifying string 
  44.     (such as his name) with a signal of SOH (hex value 01h).  
  45.  
  46.  5) Once the swain has properly received and acknowledged the string, she 
  47.     pauses to tell anyone at the console who is calling and asks if they 
  48.     wish to chat.  If they say "no" (or fail to answer in thirty seconds), 
  49.     the swain transmits a CAN (hex value 18h) and ends negotiation.  
  50.  
  51.  6) Meanwhile, the swooner has been impatiently sending ENQ after ENQ (hex 
  52.     value 05h).  If a human operator accepts chat, the swain finally 
  53.     responds to the ENQ by transmitting her own identifying string with a 
  54.     signal of SOH (hex value 01h).  Once this has been acknowledged by the 
  55.     swooner they proceed with the chat session.  
  56.  
  57.  
  58. Once a chat session is underway, the strings being transmitted back and 
  59. forth will always take the form:
  60.  
  61.     signal    ASCII SOH (hex value 01h)
  62.     block#    One character block number, in the range of space to tilde
  63.     type      Block type (see below)
  64.     data      Data, if any
  65.     ETX
  66.     crc
  67.  
  68. As before, the CRC is a two-byte CRC of everything after the signal and 
  69. before the ETX, and is sent high-byte first.
  70.  
  71. The types of blocks which may be transmitted are:
  72.  
  73.     Mnemonic  Value     Meaning
  74.     =======   =====     =======
  75.       STX      02h      Chat text to be displayed.  Data contains text.
  76.       EM       19h      End chat session.  
  77.       GS       1Dh      Receive files.  Data contains filenames.
  78.       ESC      1Bh      Pause for local MS-DOS session.  
  79.       CR       0Dh      Resume after local MS-DOS session.  
  80.       DLE      10h      Requesting remote MS-DOS session.
  81.                         Denied or ended by five or more CANs (value 18h)
  82.  
  83.  
  84. Duplicate blocks (as indicated by the block number) are ignored.  In any 
  85. collision the swooner sends a NAK (hex value 15h) and tries again, while 
  86. the swain pauses to listen.
  87.